/*
 * @Author: your name
 * @Date: 2022-04-10 17:41:26
 * @LastEditTime: 2022-04-11 20:50:14
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \drivingTow\src\score\entities\score.entity.ts
 */
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { ScoreInfoDto } from "../dto/create-score.dto";

@Entity('Score')
export class Score {
  @PrimaryGeneratedColumn()
  id:number;

  @Column()
  coach:string

  @Column()
  score:number

  @Column()
  trainee:string

  @Column()
  content:string

  @Column()
  create_time: string;

  @Column()
  catogary:string;

  @Column('simple-enum',{enum:['Evaluated','NotRated'],default:'NotRated'})
  status:string

  toResponseObject(): ScoreInfoDto {
    let responseObj: ScoreInfoDto = {
      ...this,
    };
    return responseObj;
  }
}
